# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1JiraSourceJiraQueries do
  @moduledoc """
  JiraQueries contains the Jira queries and corresponding authentication.

  ## Attributes

  *   `apiKeyConfig` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ApiAuthApiKeyConfig.t`, *default:* `nil`) - Required. The SecretManager secret version resource name (e.g. projects/{project}/secrets/{secret}/versions/{version}) storing the Jira API key. See [Manage API tokens for your Atlassian account](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/).
  *   `customQueries` (*type:* `list(String.t)`, *default:* `nil`) - A list of custom Jira queries to import. For information about JQL (Jira Query Language), see https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/
  *   `email` (*type:* `String.t`, *default:* `nil`) - Required. The Jira email address.
  *   `projects` (*type:* `list(String.t)`, *default:* `nil`) - A list of Jira projects to import in their entirety.
  *   `serverUri` (*type:* `String.t`, *default:* `nil`) - Required. The Jira server URI.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :apiKeyConfig =>
            GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ApiAuthApiKeyConfig.t() | nil,
          :customQueries => list(String.t()) | nil,
          :email => String.t() | nil,
          :projects => list(String.t()) | nil,
          :serverUri => String.t() | nil
        }

  field(:apiKeyConfig,
    as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ApiAuthApiKeyConfig
  )

  field(:customQueries, type: :list)
  field(:email)
  field(:projects, type: :list)
  field(:serverUri)
end

defimpl Poison.Decoder,
  for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1JiraSourceJiraQueries do
  def decode(value, options) do
    GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1JiraSourceJiraQueries.decode(
      value,
      options
    )
  end
end

defimpl Poison.Encoder,
  for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1JiraSourceJiraQueries do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
